package com.cpkso.yzx.repository;

import java.util.List;

import org.hibernate.Session;
import org.springframework.stereotype.Repository;

import com.cpkso.yzx.domain.Request;

import runze.util.base.HibernateDaoImp;
import runze.util.base.IDao;

/**
 * @author wrzhxy@qq.com
 * @date 2017年11月11日
 */
@SuppressWarnings("unchecked")
@Repository
public class RequestRepository extends HibernateDaoImp<Request> implements IDao<Request> {
	private static final String FindUrl = "select r.url from Request r";
	
	public List<String> findUrl() {
		try {
			Session session = getSessionFactory().getCurrentSession();
			List<String> list = (List<String>) session.createQuery(FindUrl).list();
			return list.size() < 1 ? null : list;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
}
